import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'mobx-react'

import { MainBody } from '../component/BaseApp';
import Overview from '../component/Overview';

import * as stores from '../store/index';

import { BrowserRouter, HashRouter , Switch, Route , Redirect} from 'react-router-dom'

import { LocaleProvider } from 'antd'
import zhCN from 'antd/lib/locale-provider/zh_CN';

import '../lib/awesome/css/font-awesome.min.css';
import '../style/base.less';
import '../style/pop.less';
import '../style/antd.css';

ReactDOM.render(
    <HashRouter>
        <Provider store={stores}>
	    <Switch>
		<Route path="/" render={({history,location,match}) => (
		    <LocaleProvider locale={zhCN}>
			<MainBody history={history} location={location} match={location}>
			    <Route exact path="/" component={Overview}/>
			</MainBody>
		    </LocaleProvider>
		)} />
		<Redirect to="/"/>
	    </Switch>
        </Provider>
    </HashRouter>
    , document.getElementById('app')
);
